<include file="__PUBLIC__/header"/>
<link href="__STATIC__/Admin/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css"/>
<style>
    .footer,.footer a{
        color: #fff;
    }
</style>
<div class="header"></div>
<div class="loginWraper">
    <div id="loginform" class="loginBox">
        <iframe name="iframe" style="display: none"></iframe>
        <form class="form form-horizontal" action="{|U:'login'}" method="post" target="iframe" id="form">

            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
                <div class="formControls col-xs-8">
                    <input id="username" name="username" type="text" placeholder="用户名" datatype="*" nullmsg="请填写用户名"
                           class="input-text size-L">
                </div>
            </div>

            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                <div class="formControls col-xs-8">
                    <input id="password" name="password" type="password" placeholder="密码" datatype="*" nullmsg="请填写密码"
                           class="input-text size-L">
                </div>
            </div>

            <div class="row cl">
                <div class="formControls col-xs-6 col-ms-6 col-xs-offset-3 col-ms-offset-3">
                    <input name="code" class="input-text size-L" type="text" placeholder="验证码" style="width:100px;"
                           datatype="*" nullmsg="请填写验证码">
                    <img id="code" src="{|U:'code'}" alt="验证码" title="点击刷新验证码"
                         style="cursor:pointer;width: 150px;height: 40px">
                </div>
                <div class="col-xs-3 col-ms-3"></div>
            </div>

            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <input name="" type="submit" class="btn btn-success radius size-L"
                           value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
                    <input name="" type="reset" class="btn btn-default radius size-L"
                           value="&nbsp;重&nbsp;&nbsp;&nbsp;&nbsp;置&nbsp;">
                </div>
            </div>
        </form>
    </div>
</div>
<div class="footer">Copyright 2015-2017 <a href="http://www.shyohan.com" title="上海优翰信息科技有限公司" target="_blank">上海优翰信息科技有限公司</a>
    版权所有 Powered by <a href="http://www.qzlog.com" title="轻舟CMS" target="_blank">QZLOG</a></div>
<include file="__PUBLIC__/footer"/>
<script>
    $(function () {
        $("#code").click(function () {
            $(this).attr("src", "{|U:'code'}&t=" + new Date().getTime())
        });

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            postonce: true,
            showAllError: true,
            callback: function (ret) {
                if (ret.status == 'n') {
                    if (ret.info == '验证码输入错误') {
                        $("#code").click();
                    }
                    layer.alert(ret.info);
                } else {
                    layer.msg("登录成功！");
                    location.href = "{|U:'Index/index'}";
                }
            }
        });
    })
</script>
</body>
</html>